import { Context, Next } from 'koa';
const extendContext = async (ctx: Context, next: Next) => {
    ctx.setResponse = (data: object|Array<unknown>|null = null, message: string = '获取成功', statusCode: number = 0) => {
        ctx.body = {
            statusCode,
            message,
            data
        }
    }
    await next();
}
export default extendContext;